import React, { memo, useEffect } from 'react'
// import { useSelector } from 'react-redux'
import { DetailWrapper } from './style';
import DetailPicture from './c-cpns/detail-picture';
import DetailInfos from './c-cpns/detail-infos';
import { useDispatch } from 'react-redux';
import { changeHeaderConfigAction } from 'src/store/main';

const Detials = memo(() => {
  // redux中获取数据
  // const detailInfo = useSelector((state) => state.detail.detailInfo);
  // console.log(detailInfo);

  const dispatch = useDispatch()
  useEffect(() => {
    dispatch(changeHeaderConfigAction({ isFixed: false }));
  },[dispatch])
  return (
    <DetailWrapper>
      <DetailPicture />
      <DetailInfos />
    </DetailWrapper>
  )
})

export default Detials